<?php
load()->func('tpl');
global $_W,$_GPC;

$id = $_GPC['id'];
$data = pdo_get('user', array('id' => $id));
if($_W['ispost']){
    $arr = [
        'name' => $_GPC['name'],
        'phone' => $_GPC['phone'],
        'img' => $_GPC['img'],
    ];
    $result = pdo_update('user', $arr, array('id' => $id ));
    if (!empty($result)) {
        message('更新成功',$this->createWebUrl('user'),'success');
    }
}



include $this -> template('user_edit'); 